package com.wtwd.device.service;


import com.wtwd.device.constant.AppMsgEnum;
import com.wtwd.device.model.entity.AppUserInfo;
import com.wtwd.device.model.vo.ResultVO;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zdl
 * @since 2021-08-12
 */
public interface AppUserInfoService {
    /**
     * 保存
     *
     * @param appUserInfo
     * @return
     */
    boolean save(AppUserInfo appUserInfo);

    /**
     * 更新
     *
     * @param appUserInfo
     * @return
     */
    boolean update(AppUserInfo appUserInfo);

    /**
     * 获取用户信息通过用户ID
     *
     * @param userId
     * @return
     */
    AppUserInfo getAppUserInfoByUserId(Long userId);

    /**
     * 获取app用户推送key
     * @param userId
     */
    String getAppUserPushKey(Long userId);

    /**
     *
     * @param userId
     * @return
     */
    String getAppUserLang(Long userId);

    /**
     * 推送消息
     * @param toUserId
     * @param clientType
     * @param appMsgEnum
     * @param extraParams
     * @return
     */

    ResultVO pushMsgToAppUser(Long toUserId, String clientType, AppMsgEnum appMsgEnum, String... extraParams);

    /**
     * 推送消息
     * @param toUserId
     * @param clientType
     * @param appMsgEnum
     * @param templateParam(占时只存在一个模板参数)
     * @param extraParams
     * @return
     */
    ResultVO pushTemplateMsgToAppUser(Long toUserId, String clientType, AppMsgEnum appMsgEnum,String templateParam,String... extraParams);



}
